import $request from '../utils/request'
// 测试触发后台登录接口
export function loginTest(data, method = 'get') {
  return $request({
    url: 'islogin/loginTest',
    method,
    data
  }, true)
}
// 测试Git
export function myTest(data, method = 'get') {
  return $request({
    url: 'mytest',
    method,
    data
  }, true)
}
// 测试Post
export function myTestPost(data, method = 'post') {
  return $request({
    url: 'mytest',
    method,
    data
  }, true)
}
// 获取部门数据
export function loadDept(data, method = 'get') {
  return $request({
    url: 'loadMyDepts',
    method,
    data
  }, true)
}
// code登录
export function codeLogin(data, method = 'post') {
  return $request({
    url: 'wxlogin',
    method,
    data
  }, true)
}

export function pwdLogin(data, method = 'post') {
  return $request({
    url: 'api/index/login',
    method,
    data
  }, true)
}

export function getOssSign(data, method = 'post') {
  return $request({
    url: 'api/index/getOssSign',
    method,
    data
  }, true)
}
export function purchaseInfo(data, method = 'post') {
  return $request({
    url: 'app/purchase/info',
    method,
    data
  }, true)
}
export function supplier_list(data, method = 'post') {
  return $request({
    url: 'api/service/supplier_list',
    method,
    data
  }, true)
}
export function warehouse_list(data, method = 'post') {
  return $request({
    url: 'api/service/warehouse_list',
    method,
    data
  }, true)
}
export function getPosition(data, method = 'post') {
  return $request({
    url: 'api/service/getPosition',
    method,
    data
  }, true)
}
export function goodsclass_list(data, method = 'post') {
  return $request({
    url: 'app/goodsclass/goodsclass_list',
    method,
    data
  }, true)
}
export function goods_list(data, method = 'post') {
  return $request({
    url: 'app/service/room_list_new',
    method,
    data
  }, true)
}
export function ingoods_list(data, method = 'post') {
  return $request({
    url: 'api/service/base_goods_list_new',
    method,
    data
  }, true)
}
// 结算账户
export function account_list(data, method = 'post') {
  return $request({
    url: 'app/service/account_list',
    method,
    data
  }, true)
}

export function getuserinfo(data, method = 'post') {
  return $request({
    url: 'api/user/getuserinfo',
    method,
    data
  }, true)
}
export function purchaseSet(data, method = 'post') {
  return $request({
    url: 'api/purchase/set',
    method,
    data
  }, true)
}
export function saleSet(data, method = 'post') {
  return $request({
    url: 'api/sale/set',
    method,
    data
  }, true)
}
export function customer_list(data, method = 'post') {
  return $request({
    url: 'api/service/customer_list',
    method,
    data
  }, true)
}
export function purchase_list(data, method = 'post') {
  return $request({
    url: 'api/purchase/form_list',
    method,
    data
  }, true)
}
export function sale_list(data, method = 'post') {
  return $request({
    url: 'api/sale/form_list',
    method,
    data
  }, true)
}
export function saleInfo(data, method = 'post') {
  return $request({
    url: 'app/sale/info',
    method,
    data
  }, true)
}
export function category_list(data, method = 'post') {
  return $request({
    url: 'api/service/category_list',
    method,
    data
  }, true)
}

export function wanglaiList(data, method = 'post') {
  return $request({
    url: 'api/wanglai/form_list',
    method,
    data
  }, false)
}
export function wanglaiInfo(data, method = 'post') {
  return $request({
    url: 'api/wanglai/info',
    method,
    data
  }, true)
}
export function wanglaiEdit(data, method = 'post') {
  return $request({
    url: 'api/wanglai/set',
    method,
    data
  }, true)
}

export function wanglaiAudit(data, method = 'post') {
  return $request({
    url: 'api/wanglai/auditing',
    method,
    data
  }, true)
}

// 司机登记
export function shipmentList(data, method = 'post') {
  return $request({
    url: 'api/shipment/form_list',
    method,
    data
  }, true)
}
export function shipmentInfo(data, method = 'post') {
  return $request({
    url: 'api/shipment/info',
    method,
    data
  }, true)
}
export function shipmentEdit(data, method = 'post') {
  return $request({
    url: 'api/shipment/set',
    method,
    data
  }, true)
}

